import { request } from "@/utils";
// 获取频道列表接口
export const getChannelListAPI = () => request.get('/channels')

// 提交表单接口
export const onSubmitFormAPI = (data) => request.post('/mp/articles?draft=false', data)

// 获取文章列表接口
export const getArticleListAPI = (params) => request.get('/mp/articles', { params })

// 删除文章的接口
export const deleteArticleAPI = (target) => request.delete(`/mp/articles/${target}`)

// 获取文章详情接口
export const getArticleDetailsAPI = (id) => request.get(`/mp/articles/${id}`)

// 编辑文章的接口
export const exitArticleAPI = (target) => request.put(`/mp/articles/${target.id}?draft=false`, target)